home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / batch.arc / CLS.ASM < prev    next >
Encoding:
Assembly Source File  |  1986-01-04  |  1.5 KB  |  66 lines

  1. ;
  2.         page    60,132
  3.         title    High Speed Console Clear Routine
  4. ;
  5. ;    Author:    Marty Prahl
  6. ;    Date:    12-dec-84
  7. ;    Rev:    1.0
  8. ;
  9. ;    Copyright (c) 1984 by Marty Prahl
  10. ;
  11. ;    Abstract:
  12. ;
  13. ;        This routine provides for clearing windows on any of the
  14. ;        IBM monitors in a consistent fashion.  These routines are
  15. ;        considerably faster than writing spaces to the window from
  16. ;        a high level language.  
  17. ;
  18. ;    Calling Sequence:
  19. ;    
  20. ;        A>CLS
  21. ;
  22. ;---------------------------------------------------------------------------
  23. ;
  24. ;    Symbols
  25. ;
  26. ;---------------------------------------------------------------------------
  27. ;
  28. cseg        segment para    public 'CODE'
  29.         assume    cs:cseg, ds:cseg
  30.  
  31.         org    0100h
  32.  
  33.         include system.mac
  34.  
  35.         ibm_bios        ; declare rom interrupts
  36.         f_video_io        ; declare video io functions
  37.         dos_functions
  38.  
  39.         page
  40. ;
  41. ;---------------------------------------------------------------------------
  42. ;
  43. ;    Cls   
  44. ;
  45. ;---------------------------------------------------------------------------
  46. ;
  47. cls:
  48. ;
  49. ;    Rearrange parameters for rom bios call
  50. ;
  51.         mov    ch,0        ; erase the whole screen
  52.         mov    cl,0
  53.         mov    dh,24
  54.         mov    dl,79
  55.         mov    ah,scroll_up    ; function we use to "erase"
  56.         xor    al,al        ; "erase" entire window
  57.         xor    bh,bh        ; no attribute for "erased" cells
  58.         int    video_io    ; rom bios entry point
  59.  
  60.         mov    al,0        ; no error on return
  61.         mov    ah,exit_proc    ; dos terminate
  62.         int    dos        ; dos interrupt
  63.  
  64. cseg        ends
  65.         end    cls
  66.